<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>视听词典</title>
<link href="templates/css/picandtext.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="templates/js/jquery.js"></script>
<style type="text/css">
    td.row{
        width:80px;
    }
    #topNavBar{
        margin-bottom:30px;
    }
</style>
<script type="text/javascript">
$(function(){
});
function get_explain(word,no,obj){
      $.getJSON("{{url controller="study" action="explain"}}",
        {word:word,no:no},
        function(data){
        obj.replaceWith("<p>"+data.pic_text+"</p><p>"+data.pic_text_zh+"</p>");
        }); 
}
function clickall(){
    $(":button").click();
}
</script>
</head>
<body>
    <div id="content">
  {{webcontrol type="menu" name="mymenu"}}
  <div class="page_nav">
      <a href="{{url controller=pic action=list page=$data_page.firstPage}}">首页</a>
      <a href="{{url controller=pic action=list page=$data_page.prevPage}}">上一页</a>
      <a href="{{url controller=pic action=list page=$data_page.nextPage}}">下一页</a>
      <a href="{{url controller=pic action=list page=$data_page.lastPage}}">末页</a>
      第{{$data_page.currentPage}}页/共{{$data_page.pageCount}}页  每页{{$data_page.pageSize}}条数据 共有{{$data_page.count}}条数据 
  </div>
     <table id="mytable" cellspacing="0" summary="The technical specifications of the Apple PowerMac G5 series">
     <caption></caption>
     <tr><th scope="col">图片</th><th scope="col">id</th><th scope="col">No</th><th scope="col">word</th><th scope="col">操作</th><th scope="col"><a href="#" onclick="clickall();">描述</a></th><th scope="col">排序</th></tr>
   {{foreach from=$data item=listitem}}
   <tr>
       <td class="row"><img src="{{url controller=edit action=showbysize id=$listitem.id}}" border=0 alt=""></td>
       <td class="row">{{$listitem.id}}</td>
       <td class="row">{{$listitem.No}}</td>
       <td class="row">{{$listitem.Word}}</td>
       <td class="row"><p><a href="{{url controller=pic action=edit id=$listitem.id}}" target="_blank" >编辑</a></p><p><a href="{{url controller=pic action=del id=$listitem.id}}" target="_blank" >删除</a></p></td>
       <td class=""><input type="button" onclick="get_explain('{{$listitem.Word}}',{{$listitem.No}},$(this));" name="pic_text" value="获取"</td>
       <td class="row">{{$listitem.rank}}</td>
  </tr>
    {{/foreach}}
        </table>
   <div class="page_nav">
      <a href="{{url controller=pic action=list page=$data_page.firstPage}}">首页</a>
      <a href="{{url controller=pic action=list page=$data_page.prevPage}}">上一页</a>
      <a href="{{url controller=pic action=list page=$data_page.nextPage}}">下一页</a>
      <a href="{{url controller=pic action=list page=$data_page.lastPage}}">末页</a>
      第{{$data_page.currentPage}}页/共{{$data_page.pageCount}}页  每页{{$data_page.pageSize}}条数据 共有{{$data_page.count}}条数据 
  </div>
   </div>
</body>
</html>
